home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 7 / FM Towns Free Software Collection 7.iso / data / dora / doradnld.plp < prev    next >
Text File  |  1993-11-30  |  4KB  |  148 lines

  1. %DLIBDOWN{
  2.     [forum,libno,dataname,docfile,datafile]
  3.     %otto3    {
  4.         SNDMSG({okasi_f.snd});
  5.         write(UP2|{_mopdlib.rsv},{保留;}|linebuf);
  6.         wait(Wtime2,,{,?,Q},{type({Q\n})}
  7.             ,{,H,nn,?,0},{type({0|Q\n})});im({No})
  8.         };
  9.     footnote(libno|{番ライブラリの}|dataname|{をダウンロードします});
  10.     type({\n});
  11.     wait(Wtime5,{AbortOff({ホストの反応が鈍いよぉ~\n})},{,?,}
  12.     ,{
  13.     case    (forum=NET,
  14.         {Yes},{type({F#}|libno|{|D\n})},
  15.         {No},{type({F#}|libno|{|}|forum|{|D\n})}
  16.         );
  17.     });
  18. loop    ({
  19.     wait({3},{im({Yes})}
  20.     ,{このボードではダウンロードは出来ません。},
  21.     {display({ダウンロードが禁止されている為、次の処理を行います\n});
  22.     SNDMSG({okasi_f.snd});
  23.     wait(Wtime2,,{,H,nn,?,0},{type({0|Q\n})});im({No})
  24.     }
  25.     ,{そのボードには入れません},{otto3}
  26.     ,{ボードが見つかりません},{otto3}
  27.     ,{パスワードが違います},{otto3}
  28.     ,{DOWNLOAD},
  29.     {
  30.     wait(Wtime2,,{[RET]},{type(dataname|{\n})});
  31.     loop    ({
  32.         wait    ({3},{im({Yes})}
  33.             ,{ファイルの補足説明を表示しますか},
  34.             {
  35.             type({Y\n});dispoff(!DEBUG);mkdir2(@body(docfile,,{\}));
  36.             dispoff({No});DOWNCHECK;receive(docfile);
  37.             wait(Wtime2,,{Protocol},{DOWNSTOP;type({Y\n})});im({No})
  38.             }
  39.             ,{Protocol},{type({Y\n});im({No})}
  40.             );
  41.         });
  42.     dispoff(!DEBUG);mkdir2(@body(datafile,,{\}));dispoff({No});
  43.     wait    ({5},    {
  44.             DOWNCHECK;receivey(datafile);type({\n});
  45.             SNDMSG({owata_f.snd});CHeck:={No};
  46.             wait(,,{,H,?,Q},{wait(1);type({Q\n})},
  47.             {,H,nn,?,0},{wait(1);type({0|Q\n})});
  48.             }
  49.         ,{YMODEM でダウンロードします。},
  50.         {
  51.         DOWNCHECK;receivey(datafile);type({\n});
  52.         SNDMSG({owata_f.snd});CHeck:={No};
  53.         wait(WtimeD,{otto3},{,H,?,Q},{wait(1);type({Q\n})},
  54.         {,H,nn,?,0},{wait(1);type({0|Q\n})})
  55.         }
  56.         ,{ダウンロードに失敗しました},{otto3}
  57.         ,{ボードの指定が違います},
  58.         {display({データ番号が違うため次の処理を行います\n});otto3}
  59.         )
  60.     });
  61.     });
  62.     };
  63. %PROFDOWN{
  64.     [uid]
  65.     var    UID[90];
  66.     footnote(uid|{の}|{プロフィール情報をダウンロードします});
  67.     dispoff(!DEBUG);mkdir2(LOG2|{profile});dispoff({No});
  68.     UID:=uid;
  69.     loop    ({
  70.         %id1 @head(UID,{,});
  71.         UID:=@body(UID,{,});
  72.             dispoff(!DEBUG);
  73.             command({del }|LOG2|{profile\}|id1|{.prf});
  74.             dispoff({No});DOWNCHECK;
  75.             receive(LOG2|{profile\}|id1|{.prf});
  76.             type({P|P}|id1);type({\n});
  77.         loop    ({
  78.             wait({3},{im({Yes})},
  79.             {) >},{type({0|Q\n});wait(2);im({No})});
  80.             });
  81.             DOWNSTOP;
  82.         case(UID,{},{im({No})},,{im({Yes})});
  83.         });
  84.     };
  85. /* データライブラリからの自動ダウンロード処理     */
  86. %AUTOdwn1{
  87.     case    (@head(linebuf,{=}),
  88.         {forum},    /* ファイルボードからのダウンロード */
  89.         {DLIBDOWN(
  90.             @tail(linebuf,{forum=},{;}),
  91.             @tail(linebuf,{libno=},{;}),
  92.             @tail(linebuf,{dataname=},{;}),
  93.             @tail(linebuf,{docfile=},{;}),
  94.             @tail(linebuf,{datafile=},{;}));
  95.         im({Yes});    /* 終わったら次の行を読む */
  96.         },
  97.         {profile},    /* プロフィール情報のダウンロード */
  98.         {
  99.         PROFDOWN(@tail(linebuf,{profile=},{;}));
  100.         im({Yes});    /* 終わったら次の行を読む */
  101.         },
  102.         {},{im({No})},    /* 空文字列なら終了 */
  103.         ,{im({Yes})}    /* それ以外なら次の行を読む */
  104.         )
  105.     };
  106. %AUTOdown{
  107.     [file]
  108.     case    (@filechk(file),
  109.         {Yes},
  110.         {
  111.         line:=0;
  112.         loop    ({
  113.             line:=line+1;
  114.             linebuf:={};
  115.             linebuf:=@read(file,line,1);
  116.             case    (@getchar(linebuf,1,5)={保留;},
  117.                 {Yes},
  118.                 {write(UP2|{_mopdlib.rsv},linebuf);im({Yes})},
  119.                 {No},
  120.                 {AUTOdwn1},
  121.                 );
  122.             });
  123.         AUTOdwn1;
  124.         },
  125.         {No},
  126.         {
  127.         SNDMSG({okasi_f.snd});
  128.         display({\n}|file|{制御ファイルがありません\n});
  129.         });
  130.     };
  131. /*    ダウンロード制御ファイル指定の有無の判定処理    */
  132. %AUTODNLD{
  133.     footnote({自動ダウンロード処理を行います});
  134.     case    (@filechk(UP2|{_mopdlib.ctl}),
  135.         {Yes},
  136.         {
  137.         AUTOdown(UP2|{_mopdlib.ctl});
  138.         delfile(UP2|{_mopdlib.bak});
  139.         renname(UP2|{_mopdlib.ctl},{_mopdlib.bak_});
  140.         case    (@filechk(UP2|{_mopdlib.rsv}),
  141.             {Yes},
  142.             {renname(UP2|{_mopdlib.rsv},{_mopdlib.ctl})}
  143.             );
  144.         });
  145.     };
  146. var    line    [3];    /* ダウンロード制御ファイル行カウンタ    */
  147. var    linebuf    [258];    /* ダウンロード制御文バッファ        */
  148. DOWNSTART;CHeck:={Yes};AUTODNLD;DOWNSTOP;